<?php
namespace Admin\Controller;
use Think\Controller;
class IndexController extends Controller {
    public function index(){
        if (isMobile()) {
            $this->display("./User/index_bf");
        } else {
            $this->display("./User/index");
        }
    }

    //登陆
    public function login(){
        $admin = M("user_admin");
        $rs =$admin->where("name = '".$_REQUEST['user']."' and pwd = '".$_REQUEST['pwd']."'")->find();
        if(empty($rs)){
            $this->error("用户名或者密码错误");
        }
        session("user", $_REQUEST['user']);
        $this->display("Order/order");
    }
}